import React, { Component } from "react";
import { Modal } from "@ali/ding-ui";
import { setRight } from "../../utils/dingtalk.js";
import "./index.less"

export default class HelpModal extends Component {

    constructor(props) {
        super(props);
        this.state = {
            visible: false
        }
    }
    componentDidMount() {
        const t = this;
        //新增帮助
        setRight({
            text: "帮助",
            onClick: function (e) {
                t.setState({ visible: true })
            }
        })
    }
    render() {
        const t = this;
        return <Modal
            title="钉钉智能人事共创沟通群"
            transparent
            maskClosable={true}
            visible={this.state.visible}
            onClose={this.onClose}
            footer={[{ text: '我知道了', onPress: () => { t.setState({ visible: false }) } }]}>
            <div className="hr-modal">
                <img src="https://gw.alicdn.com/tfs/TB1P8Qjab_I8KJjy1XaXXbsxpXa-395-370.png" alt="智能人事内测群" />
                <div className="hrcenter-modal">长按识别二维码，立即加入该群</div>
            </div>
        </Modal>
    }
}